#ifndef ZENDJINN_H_INCLUDED
#define ZENDJINN_H_INCLUDED

#include "types.h"

#include "window.h"

#include "keyboard.h"
#include "mouse.h"
#include "joystick.h"
#include "haptic.h"
//#include "touch.h"

class ZenDjinn : public Instance, public Singleton<ZenDjinn>
{
    public:
        ZenDjinn(const string& name = "Untitled", ClassId* classId = sClassId);
        virtual ~ZenDjinn();

        virtual bool init();
        static void quit();

        virtual void run();
        virtual bool isRunning() { return mRunning; }

        virtual float getFPS() { return mFPS; }
        virtual void setFPS(float fps) { mFPS = fps; }

        virtual void update(float dt);

        virtual void handleEvent(SDL_Event* event, float dt);

        DECLARE_CLASSID(ZenDjinn);
        virtual bool load(DataStream* ds = 0);
        virtual bool save(DataStream* ds = 0);

    private:
        bool mRunning;
        float mFPS;

};

#endif // ZENDJINN_H_INCLUDED
